<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>文章</title>
    <meta name="keywords" content="课程学习问答系统">
    <meta name="description" content="课程学习问答系统">
    <script src="../static/js/jquery/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="../static/layui/layui.js" type="text/javascript"></script>
    <script src="../static/js/index/index.js" type="text/javascript"></script>
    <script src="../static/js/index/freezeheader.js" type="text/javascript"></script>
    <script src="../static/layui/lay/modules/layer.js" type="text/javascript"></script>
    <script src="../static/js/index/sliders.js" type="text/javascript"></script>
    <script src="../static/js/index/html5.js" type="text/javascript"></script>
    <script src="../static/js/index/article.js" type="text/javascript"></script>
    <link rel="stylesheet" href="../static/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="../static/layui/css/modules/layer/default/layer.css"/>
    <link rel="stylesheet" href="../static/css/global.css"/>

    <!--
    -->
</head>
<body>
<%@ include file="header.jsp" %>
<div class="layui-container container">

    <div class="layui-row layui-col-space20">
        <div class="layui-col">
            <div>
                  <span class="layui-breadcrumb">
              <a href="index.html">首页</a>
              <a><cite>搜索</cite></a>
            </span>
                <!-- 如果是空的话，返回一个连接进行提问 -->
                <hr class="layui-bg-red">
                <h2 style="text-align: center;">
                    搜索的结果如下:<h3>${searchres}</h3>
                </h2>
                <hr class="layui-bg-red">
                <c:set var="flag2" scope="session" value="${listSum}"></c:set>
                <c:if test="${flag2!=0}">

                    <ul>
                        <c:forEach items="${AllQuestionLists}" var="question">
                            <li>
                                <div class="article-list">
                                    <p>
                                        <a href="/student/questionOne/${question.questionId}">问题:${question.questionText}...</a>
                                        <b style="float: right;">
                                            <c:set var="flag3" value="${question.questionIsAnswer}"></c:set>
                                            <c:if test="${flag3==1}">
                                                <em style="color:#999">[已回复]</em>

                                            </c:if>
                                            <c:if test="${flag3==0}">
                                                <em style="color:#999">[未回复]</em>
                                            </c:if> <fmt:formatDate
                                                value="${question.questionTime}" pattern="yyyy-MM-dd HH:mm:ss"/></b>
                                    </p>
                                </div>
                            </li>
                        </c:forEach>
                    </ul>


                </c:if>
                <c:if test="${flag2==0}">
                    <div class="article-list">
                        <h3>
                            未找到答案， <a style="color: #00BFFF" href="/student/requestQuestion">去提问</a>
                        </h3>
                    </div>
                </c:if>
            </div>
            <!--分页-->
            <%--<div id="page"></div>--%>
        </div>
    </div>
    <%@ include file="footer.jsp" %>
</div>
</body>
</html>
